<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
<title>移动大掌柜</title>
<link rel="stylesheet" href="../template/assets/css/amazeui.min.css"/>
<link rel="stylesheet" href="../template/website/css/app.css"/>
</head>

<body>
  <script type="text/javascript" src="../template/assets/js/jquery.min.js"></script>
  <script type="text/javascript" src="../template/assets/js/amazeui.min.js"></script>
  <script type="text/javascript" src="../template/assets/js/handlebars.min.js"></script>
  <script type="text/javascript" src="../template/assets/js/amazeui.widgets.helper.min.js"></script>
  <script type="text/javascript" src="../template/website/js/app.js"></script>
  <script type="text/javascript">
    //返回页面分享的参数,当当前页面有canAppShare=1参数时需要添加此函数resShareParm(函数名不能改，客户端已经只调用这个函数)
    function resShareParm() {
        var regText1 = "saleType=1";
        var regText2 = "saleType=3";
        var regS1 = new RegExp(regText1, "gi");
        var regS2 = new RegExp(regText2, "gi");
        //var urlpath = window.location.href.replace(regS1, "saleType=2").replace(regS2, "saleType=4");//修改平台类型(原生分享出去统一改为分享平台)：1（直销通代客下单）改为 2（直销通分享页面购买） 3（微店原生购买）改为 4（微店分享购买）
        var urlpath = "http://sc.10086.cn/ztapp/scmccClientWap/shareFX/download.html?data=f01ee099049d63715eb7cff24d89659a4574db095c9fd3dce9f8a26919b7ff182d7875d3ac01ff37c99d1a00b010d4d2ff3cea59b5017dc99f8c54200dee25ba";
        var imgpath = 'http://'+window.location.host+'/upload/file/default_share_img.png';
        var title = "四川移动掌厅";
        var description = "四川移动掌厅，充值95折，流量8折，立送新人5元券！";
        var data = "url=" + urlpath + "&&img=" + imgpath + "&&title=" + title + "&&description=" + description + "";
        return data;
    }
    
	function reloadTargetUrl(){
	    var targetUrl = "";
	    var url = window.location.search;
	    
	    url = url.substring(5);
	    var params = url.split("&");
	    targetUrl = params[0];
	    
	    window.location.replace(targetUrl + "?canAppShare=1&data=f01ee099049d63715eb7cff24d89659a4574db095c9fd3dce9f8a26919b7ff182d7875d3ac01ff37c99d1a00b010d4d2ff3cea59b5017dc99f8c54200dee25ba");
	}
	
	$(function(){
	    reloadTargetUrl();
	});
  </script>
</body>
</html>